package com.xjgzinfo.usdp.service.vo;

import com.xjgzinfo.usdp.service.dto.BladeVisualDbDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Contract for a generic dto to entity mapper.
 */

@Mapper
public interface BladeVisualVOEntityMapper {

    BladeVisualVOEntityMapper INSTANCE = Mappers.getMapper(BladeVisualVOEntityMapper.class);

    @Mappings({
            @Mapping(source = "id", target = "id"),
            @Mapping(source = "name", target = "name"),
            @Mapping(source = "username", target = "username", ignore = true),
            @Mapping(source = "password", target = "password", ignore = true),
            @Mapping(source = "url", target = "url"),
            @Mapping(source = "driverClass", target = "driverClass"),
            @Mapping(source = "status", target = "status"),
            @Mapping(source = "remark", target = "remark"),
            @Mapping(source = "isDeleted", target = "isDeleted"),
            @Mapping(source = "createUser", target = "createUser"),
            @Mapping(source = "createDept", target = "createDept"),
            @Mapping(source = "createTime", target = "createTime"),
            @Mapping(source = "updateUser", target = "updateUser"),
            @Mapping(source = "updateTime", target = "updateTime"),
    })
    BladeVisualDbVO do2Vo(BladeVisualDbDTO bladeVisualDbDTO);

    List<BladeVisualDbVO> doList2VoList(List<BladeVisualDbDTO> bladeVisualDbDTOS);
}
